﻿<%@ Page Title="" Language="C#" MasterPageFile="NewAccountMasterPage.Master" AutoEventWireup="true"
    CodeBehind="Dashboard.aspx.cs" Inherits="AteneoLibri.Account.Dashboard" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Dashboard
    </h2>
    <asp:Literal ID="ltlLastAccess" runat="server"></asp:Literal>
    <div class="LandscapeDataVisualization">
        <asp:DataList ID="dlLibrary" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Horizontal" RepeatColumns="2" EnableViewState="false">
            <HeaderTemplate>
                <h3>
                    Biblioteca personale</h3>
            </HeaderTemplate>
            <ItemTemplate>    
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>
                           
<%--                <div class="BookTileBox">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div>
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Font-Italic="true" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div style="display: block;">
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
        <asp:Label ID="lblEmptyLibrary" runat="server" Text="Non sono presenti libri nella tua libreria."
            ForeColor="Blue" Visible="false"></asp:Label>
    </div>

    <div class="PortraitDataVisualization">
        <asp:DataList ID="dlLibraryPortrait" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Vertical" RepeatColumns="1" EnableViewState="false">
            <HeaderTemplate>
                <h3>
                    Biblioteca personale</h3>
            </HeaderTemplate>
            <ItemTemplate>   
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>       
                <%--<div class="BookTileBox BookTileBoxSmall">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div>
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Font-Italic="true" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div style="display: block;">
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>

    <div class="LandscapeDataVisualization">
        <asp:DataList ID="dlSoldBooks" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Horizontal" RepeatColumns="2" EnableViewState="false">
            <HeaderTemplate>
                <h3>
                    Libri venduti</h3>
            </HeaderTemplate>
            <ItemTemplate>
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>
                <%--<div class="BookTileBox">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div>
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div>
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>

    <div class="PortraitDataVisualization">
        <asp:DataList ID="dlSoldBooksPortrait" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Horizontal" RepeatColumns="1" EnableViewState="false">
            <HeaderTemplate>
                <h3>
                    Libri venduti</h3>
            </HeaderTemplate>
            <ItemTemplate>
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>

               <%-- <div class="BookTileBox">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div>
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div>
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>

    <div class="LandscapeDataVisualization">
        <asp:DataList ID="dlPurchasedBook" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Horizontal" RepeatColumns="2" EnableViewState="false">
            <HeaderTemplate>
                <h3>
                    Libri acquistati</h3>
            </HeaderTemplate>
            <ItemTemplate>
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>

               <%-- <div class="BookTileBox">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div>
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div>
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>

    <div class="PortraitDataVisualization">
        <asp:DataList ID="dlPurchasedBookPortrait" runat="server" BackColor="#FFFFFF" DataKeyField="IdBook"
            RepeatDirection="Horizontal" RepeatColumns="1" EnableViewState="false">
            <HeaderTemplate>
                <h3>
                    Libri acquistati</h3>
            </HeaderTemplate>
            <ItemTemplate>
                <a class="orange" href='/BookDetails.aspx?IdBook=<%# Eval("IdBook") %>'>
                    <%# Eval("Title") %>
                    <div class="tile-price">
                        <%# Eval("SellingPrice", "{0:C}") %>
                    </div>
                </a>

                <%--<div class="BookTileBox">
                    <div class="BookContentBox">
                        <div class="BookIcon">
                            <asp:ImageButton ID="btnDetails" runat="server" CssClass="metroButton" AlternateText="Dettagli"
                                ImageUrl="~/Images/buttons/Next.png" OnClick="btnDetails_Click" CommandArgument='<%# Eval("IdBook") %>' />
                        </div>
                        <div class="BookTitleBox">
                            <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                        </div>
                        <div class="BookPriceBox">
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("SellingPrice", "{0:C}") %>'></asp:Label>
                        </div>
                        <div>
                            Autore/i:
                            <asp:Label ID="lblAuthors" runat="server" Text='<%# Eval("Author") %>'></asp:Label>
                        </div>
                        <div>
                            Venditore:
                            <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                        </div>
                    </div>
                    <div class="BookDateBox">
                        Data inserimento libro:
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("InsertDate", "{0:d}") %>'></asp:Label>
                    </div>
                </div>--%>
            </ItemTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:DataList>
    </div>
</asp:Content>
